<%@ include file="../taglibs.jsp" %>
	<style type="text/css">
		#page1 .body2{background:none;}
	</style>	
	<sec:authorize access="hasRole('ROLE_USER')">
		<!-- For login user -->
		<c:url value="/j_spring_security_logout" var="logoutUrl" />
		<form action="${logoutUrl}" method="post" id="logoutForm">
			<input type="hidden" name="${_csrf.parameterName}"
				value="${_csrf.token}" />
		</form>
		<script>
			function formSubmit() {
				document.getElementById("logoutForm").submit();
			}
		</script>
	
	</sec:authorize>
			<header>
				<div class="wrapper row" >
				<h1><a href="inicio.html" id="logo"><img src='<c:url value="/plantilla/images/logo.png"/>'></a></h1>
				<nav>
					<ul id="menu">	
					
						<c:if test="${menu[0] != null}">					
						<spring:url var="url0" value="${menu[0].vinculo}" />
							<c:if test="${menu[0].activa!='active'}">
								<li id="nav1" style='width:76px;' class="${menu[0].activa}"><a Style='background:${menu[0].imagedes} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[0].imageact}';" onmouseout="this.style.backgroundImage='${menu[0].imagedes}';"href="${url0}">${menu[0].texto1}<span>${menu[0].texto2}</span></a></li>
							</c:if>
							<c:if test="${menu[0].activa=='active'}">
								<li id="nav1" style='width:76px;' class="${menu[0].activa}"><a Style='background:${menu[0].imageact} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[0].imageact}';" onmouseout="this.style.backgroundImage='${menu[0].imageact}';"href="${url0}">${menu[0].texto1}<span>${menu[0].texto2}</span></a></li>
							</c:if>								
						</c:if>
						<c:if test="${menu[1] != null}">						
						<spring:url var="url1" value="${menu[1].vinculo}" />
							<c:if test="${menu[1].activa!='active'}">						
								<li id="nav2" style='width:76px;' class="${menu[1].activa}"><a Style='background:${menu[1].imagedes} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[1].imageact}';" onmouseout="this.style.backgroundImage='${menu[1].imagedes}';"href="${url1}">${menu[1].texto1}<span>${menu[1].texto2}</span></a>
							</c:if>
							<c:if test="${menu[1].activa=='active'}">
								<li id="nav1" style='width:76px;' class="${menu[1].activa}"><a Style='background:${menu[1].imageact} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[1].imageact}';" onmouseout="this.style.backgroundImage='${menu[1].imageact}';"href="${url1}">${menu[1].texto1}<span>${menu[1].texto2}</span></a></li>
							</c:if>								
						</c:if>
						<c:if test="${menu[2] != null}">
						<spring:url var="url2" value="${menu[2].vinculo}" />
							<c:if test="${menu[2].activa!='active'}">						
								<li id="nav3" style='width:76px;' class="${menu[2].activa}"><a Style='background:${menu[2].imagedes} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[2].imageact}';" onmouseout="this.style.backgroundImage='${menu[2].imagedes}';"href="${url2}">${menu[2].texto1}<span>${menu[2].texto2}</span></a></li>
							</c:if>
							<c:if test="${menu[2].activa=='active'}">
								<li id="nav1" style='width:76px;' class="${menu[2].activa}"><a Style='background:${menu[2].imageact} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[2].imageact}';" onmouseout="this.style.backgroundImage='${menu[2].imageact}';"href="${url2}">${menu[2].texto1}<span>${menu[2].texto2}</span></a></li>
							</c:if>								
						</c:if>
						<c:if test="${menu[3] != null}">
						<spring:url var="url3" value="${menu[3].vinculo}" />
							<c:if test="${menu[3].activa!='active'}">						
								<li id="nav4" style='width:76px;' class="${menu[3].activa}"><a Style='background:${menu[3].imagedes} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[3].imageact}';" onmouseout="this.style.backgroundImage='${menu[3].imagedes}';"href="${url3}">${menu[3].texto1}<span>${menu[3].texto2}</span></a></li>
							</c:if>
							<c:if test="${menu[3].activa=='active'}">
								<li id="nav1" style='width:76px;' class="${menu[3].activa}"><a Style='background:${menu[3].imageact} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[3].imageact}';" onmouseout="this.style.backgroundImage='${menu[3].imageact}';"href="${url3}">${menu[3].texto1}<span>${menu[3].texto2}</span></a></li>
							</c:if>								
						</c:if>
						<c:if test="${pageContext.request.userPrincipal.name == null}">
							<spring:url var="url4" value="${menu[4].vinculo}" />
							<li id="nav5"  style='{"${menu[4].imagedes}"}}:hover {"${menu[4].imageact}"};width:76px;' class="${menu[4].activa}"><a href="${url4}">${menu[4].texto1}<span>${menu[4].texto2}</span></a></li>
						</c:if>
						<c:if test="${pageContext.request.userPrincipal.name != null}">
							<spring:url var="url4" value="${menu[4].vinculo}" />
							<li id="nav6" style="width: 76px;" class="${menu[4].activa}"><a id="salir" href="${url4}">${menu[4].username}<span><spring:message code="crs_menu_salir"/></span></a></li>
						</c:if>
						<!--
						<li id="nav1" style="width: 76px;" >
							<div class="idioma"  style="padding-left: 27px;display:block;width: 20px;margin-top: 10px;">
 
								<a href="?language=es" style="background: none;height: 20px;"><span>Esp</span></a>
								<a href="?language=eu" style="background: none;height: 20px;"><span>Eus</span></a>
								<a href="?language=en" style="background: none;height: 20px;"><span>Eng</span></a>
								 
							</div>
						</li>
						-->
					</ul>
				</nav>
				
				</div>
			</header>